package org.smallframework.spring;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import sf.database.OrmConfig;

public class OrmConfigFactoryBean extends OrmConfig implements FactoryBean<OrmConfig>, InitializingBean {
    @Override
    public void afterPropertiesSet() throws Exception {
        instance = this;
        init();
    }

    @Override
    public OrmConfig getObject() throws Exception {
        instance = this;
        return this;
    }

    @Override
    public Class<?> getObjectType() {
        return OrmConfig.class;
    }
}
